package com.sc.nft.controller;

import com.sc.nft.annotation.UserLogin;
import com.sc.nft.dto.IdRequest;
import com.sc.nft.feign.WxMiniQuestionClient;
import com.sc.nft.req.question.WxMiniQuestionPageReq;
import com.sc.nft.req.question.WxMiniQuestionReq;
import com.sc.nft.sup.PageResult;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.question.QuestionDetailsVO;
import com.sc.nft.vo.question.QuestionPageVO;
import com.sc.nft.vo.question.QuestionWebTypeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/ipMall/admin/wxMiniMall/question")
@Api(tags = "用户端小程序常见问题")
public class WxMiniQuestionController {

    private final WxMiniQuestionClient wxMiniQuestionClient;


    /**
     * 用户端获取常见问题
     * @return
     */
    @PostMapping(value = "/webGet", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "用户端获取常见问题")
    @UserLogin
    public Result<List<QuestionWebTypeVO>> removeQuestion() {
        return wxMiniQuestionClient.webGet();
    }

}